<?php

namespace App\Http\Requests\Wechat;

use App\Http\Requests\ApiRequest;

/**
 * @deprecated - App 不清理
 *
 * @property mixed sex
 * @property mixed skin_record_id
 * @property mixed skin_detector_id
 * @property mixed wax_sid
 * @property mixed openid
 */
class RecommendProductIndexRequest extends ApiRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'skin_detector_id' => 'required|int|in:1,2,3',
            'wax_sid'          => 'required_if:skin_detector_id,2|int|in:1,2,3,4,5',
            'sex'              => 'sometimes|required|in:0,1,2',
            'skin_record_id'   => 'required|int|min:1'
        ];
    }
}
